Release 10.1A: OpenEdge Development:
Programming Interfaces
Demand-driven exchanges
In a demand-driven exchange, the OpenEdge client sends data to or requests data from the server, and waits for each exchange to complete before continuing. The
DDE EXECUTE,DDE REQUEST, andDDE SENDstatements all invoke demand-driven exchanges.Execute exchanges
You can use the
DDE EXECUTEstatement to send commands for the DDE server to execute, as shown in the "Initiating a conversation" section. Typically, you send server commands in a conversation opened for the System topic of the server application. However, the server might support commands for any topic that it provides. For example, Excel lets you select a range of cells (data items) in a worksheet topic. In effect, server commands are data items that it executes when sent with theDDE EXECUTEstatement. For a more complete example of this type of exchange, see the "Closing DDE conversations" section.The System topic for your server application might also provide other data items that you can read or set using request and send exchanges. These data items typically provide server options or status information to the client.
Request and send exchanges
You can use the
DDE REQUESTstatement to retrieve any server data item as a character string value. If you plan to convert the string value to another Progress data type (for example,DATE), you must convert the string to the correct format.You can use the
DDE SENDstatement to send a character string value to any server data item. You must ensure that the string conforms to a format acceptable to the server data item.You might use request and send exchanges to create new database records from the rows of a worksheet, or iteratively read a OpenEdge database and fill out worksheet rows from selected records. For example, the following code fragment fills out an Excel worksheet using three fields from the customer table of the sports database:
In the example, the first three DDE statements send column titles to the first three columns of the first row of the worksheet. Then, for each customer record showing more than $10,000 in payables, the DDE statements send the customer’s name, balance, and state of residence to the appropriate columns of the next row in the worksheet.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |